1. Field of the Invention
The present invention relates generally to a microcomputer system, and more particularly to, a method of fault protection for a microprocessor in a microcomputer system.
2. Description of Related Art
Typically, microcomputer systems include a microprocessor to control elements. The microprocessor, operating normally, executes instructions in an intended sequence. If something causes the microprocessor to execute instructions in a sequence different than what is intended by software (program) definition, a "fault" has occurred. When a fault occurs, the program gets off track and may cause the microprocessor to perform operations that are undesirable. Therefore, a need exists to get the program back on track and within a predetermined time period. This predetermined time period must be less than the time it takes for an undesirable result to occur based on the unintended operation.
Referring to FIG. 1, a microcomputer system having no system protection devices (system protection devices such as the computer operating properly (COP) watchdog system, illegal OPCODE detection circuit, and software interrupt found on the Motorola (68HC11 microprocessor) has a normal operating mode and a special mode in blocks A and B, respectively, is shown. The special operating mode is entered when the program operating in the normal mode determines that it is not proper or safe to continue the normal mode of operation. If the program gets off track due to a fault, it advances to a program lost block C where the microprocessor may operate indefinitely in an unintended manner. As a result, it would take a power-on or external microprocessor reset to put the program back to a known starting point.
Referring to FIGS. 2A and 2B, a microcomputer system having system protection devices only with normal operating and special modes in blocks A and B, respectively, is shown. If the program gets off track due to a fault, it advances to the program lost mode in block C. The system protection device will sense this and cause the program to stop its unintended operation and start from a known point such as block A in FIG. 2A or block B in FIG. 2B. A technique is needed for determining what path to take from the program lost mode in block C point, since it may not be appropriate for the program to go back to normal operation. If this is the case, when a fault is detected, the microprocessor must be put into the special mode of operation.
3. Objects of the Present Invention
It is, therefore, one object of the present invention to provide a method of fault protection to enable the microprocessor to get back on track in a proper manner without being put into a special mode of operation.
It is another object of the present invention to determine the microprocessor's past history of operation (before the fault) in order to select the proper or most desirable path for the program to take after the fault has occurred.